import fetch from 'common/src/utils/fetch'


/**
 *获取互选跨学科名单列表
 */
function getElcMutualCrossList(data) {
    return fetch({
        url: '/api/electionservice/elcMutualCross/getElcMutualCrossList',
        data:data,
        method: 'post',
    });
}

/**
 *初始化
 */
function init(calendarId) {
    return fetch({
        url: '/api/electionservice/elcMutualCross/init?calendarId='+calendarId,
        method: 'post',
    });
}


/**
 *新增
 */
function add(calendarId,studentIds,mode) {
    return fetch({
        url: '/api/electionservice/elcMutualCross/add',
        params:{calendarId: calendarId,studentIds: studentIds,mode:mode},
        method: 'post',
    });
}

/**
 *批量新增
 */
function addByCondition(data) {
    return fetch({
        url: '/api/electionservice/elcMutualCross/batchAdd',
        data:data,
        method: 'post',
    });
}

/**
 *添加所有
 */
function addAll(data) {
    return fetch({
        url: '/api/electionservice/elcMutualCross/addAll',
        data:data,
        method: 'post',
    });
}


/**
 *删除
 */
function deleteData(data) {
    return fetch({
        url: '/api/electionservice/elcMutualCross/delete',
        data:data,
        method: 'post',
    });
}

/**
 *批量删除
 */
function deleteByCondition(data) {
    return fetch({
        url: '/api/electionservice/elcMutualCross/batchDelete',
        data:data,
        method: 'post',
    });
}

/**
 *删除全部
 */
function deleteAll(data) {
    return fetch({
        url: '/api/electionservice/elcMutualCross/deleteAll',
        params:data,
        method: 'post',
    });
}

export default {
    getElcMutualCrossList,
    "init": init,
    "add":add,
    "addByCondition":addByCondition,
    "addAll":addAll,
    "deleteData":deleteData,
    "deleteByCondition":deleteByCondition,
    "deleteAll":deleteAll,
}



